package com.dodoke.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dodoke.dto.RetailCompanyDTO;
import com.dodoke.entity.RetailCompany;
import com.dodoke.vo.RetailCompanyAllListVO;
import com.dodoke.vo.RetailCompanyVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 公司信息数据库操作接口
 */
@Mapper
public interface RetailCompanyMapper extends BaseMapper<RetailCompany> {

    /**
     * 公司信息分页查询
     *
     * @param page
     * @param retailCompanyDTO
     * @return
     */
    Page<RetailCompanyVO> selectByList(Page<RetailCompanyVO> page, @Param("retailCompanyDTO") RetailCompanyDTO retailCompanyDTO);

    /**
     * 插入公司信息
     *
     * @param retailCompany
     * @return
     */
    int insertRetailCompany(RetailCompany retailCompany);

    /**
     * 更新公司信息
     *
     * @param retailCompany
     * @return
     */
    int updateRetailCompany(RetailCompany retailCompany);

    /**
     * 获取所有公司列表
     * @return
     */
    List<RetailCompanyAllListVO> selectAllList();
}
